package cn.edu.zjicm.wordsnet_d.view;

import cn.edu.zjicm.wordsnet_d.util.Utils;
import android.content.Context;
import android.util.AttributeSet;

public class Avatar extends CircleImageView {

	public Avatar(Context context) {
		super(context);
	}

	public Avatar(Context context, AttributeSet attrs) {
		super(context, attrs);
	}

	public Avatar(Context context, AttributeSet attrs, int defStyle) {
		super(context, attrs, defStyle);
	}

	@Override
	protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
		int mode = MeasureSpec.getMode(widthMeasureSpec);
		int width = Utils.getScreenWidth(getContext());
		widthMeasureSpec = MeasureSpec.makeMeasureSpec(width / 5, mode);
		super.onMeasure(widthMeasureSpec, widthMeasureSpec);
	}

}
